<?php

/**
 * Form Hidden Element class
 *
 * @author Mathieu Pheulpin - sokaru91@gmail.com
 *
 */
class Mac_Form_Element_Hidden extends Mac_Form_Element_Abstract
{
    public function __construct ($name, $value)
    {
        parent::__construct($name);
        $this->value = $value;
    }

    public function __toString ()
    {
        return '<input
            type="hidden"
            id="'.$this->id.'"
            name="'.$this->name.'"
            value="'.$this->value.'"
            '.((count($this->class) > 0) ? 'class="'.implode(' ', $this->class).'"' : '').'
            '.$this->printOptions().'
        />';
    }
}